import { createRouter, createWebHashHistory } from "vue-router";
import CcLogin from "./views/CcLogin.vue";
import CcMain from "./views/CcMain.vue";

//路由词典
const routes = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        component: CcLogin
    },
    {
        path: '/main',
        component: CcMain
    }
]

//路由器对象
const router = createRouter({
    routes,     //路由词典
    history: createWebHashHistory()  //基于#开头的路由地址历史记录
})

export default router